package com.ruoyi.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.function.mapper.TollMileageStatMapper;
import com.ruoyi.function.domain.TollMileageStat;
import com.ruoyi.function.service.ITollMileageStatService;

/**
 * 收费里程实测数据
Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class TollMileageStatServiceImpl implements ITollMileageStatService 
{
    @Autowired
    private TollMileageStatMapper tollMileageStatMapper;

    /**
     * 查询收费里程实测数据

     * 
     * @param id 收费里程实测数据
主键
     * @return 收费里程实测数据

     */
    @Override
    public TollMileageStat selectTollMileageStatById(Long id)
    {
        return tollMileageStatMapper.selectTollMileageStatById(id);
    }

    /**
     * 查询收费里程实测数据
列表
     * 
     * @param tollMileageStat 收费里程实测数据

     * @return 收费里程实测数据

     */
    @Override
    public List<TollMileageStat> selectTollMileageStatList(TollMileageStat tollMileageStat)
    {
        return tollMileageStatMapper.selectTollMileageStatList(tollMileageStat);
    }

    /**
     * 新增收费里程实测数据

     * 
     * @param tollMileageStat 收费里程实测数据

     * @return 结果
     */
    @Override
    public int insertTollMileageStat(TollMileageStat tollMileageStat)
    {
        return tollMileageStatMapper.insertTollMileageStat(tollMileageStat);
    }

    /**
     * 修改收费里程实测数据

     * 
     * @param tollMileageStat 收费里程实测数据

     * @return 结果
     */
    @Override
    public int updateTollMileageStat(TollMileageStat tollMileageStat)
    {
        return tollMileageStatMapper.updateTollMileageStat(tollMileageStat);
    }

    /**
     * 批量删除收费里程实测数据

     * 
     * @param ids 需要删除的收费里程实测数据
主键
     * @return 结果
     */
    @Override
    public int deleteTollMileageStatByIds(Long[] ids)
    {
        return tollMileageStatMapper.deleteTollMileageStatByIds(ids);
    }

    /**
     * 删除收费里程实测数据
信息
     * 
     * @param id 收费里程实测数据
主键
     * @return 结果
     */
    @Override
    public int deleteTollMileageStatById(Long id)
    {
        return tollMileageStatMapper.deleteTollMileageStatById(id);
    }

    @Override
    public boolean hasChildById(Long id)
    {
        return tollMileageStatMapper.hasChildById(id) > 0;
    }
}
